/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-08-26 17:00:49
 * @LastEditors: Wang Shuo wangshuo@sgsimulation.com
 * @LastEditTime: 2024-08-30 11:15:09
 * @FilePath: \SGFEM\DataStructure\FEM\Load\src\PLOAD1Data.cpp
 */
#include "DataStructure/Input/Load/PLOAD1Data.h"

#include "DataStructure/Common/Validation.h"

using namespace SG::DataStructure;

bool SG::DataStructure::FEM::operator== (const PLOAD1Data& a, const PLOAD1Data& b)
{
    if (a.m_sId != b.m_sId)
    {
        return false;
    }
    if (a.m_eId != b.m_eId)
    {
        return false;
    }
    if (a.m_type != b.m_type)
    {
        return false;
    }
    if (a.m_scale != b.m_scale)
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_x1, b.m_x1))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_x2, b.m_x2))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_p1, b.m_p1))
    {
        return false;
    }
    if (!SG::DataStructure::Common::isNear (a.m_p2, b.m_p2))
    {
        return false;
    }

    if (a.m_domainId != b.m_domainId)
    {
        return false;
    }
    return true;
}